import Vue from 'vue'
import Router from 'vue-router'
// 定制线路
import buyIndex from '@/wx/example/pages/buy/index'
import buyTicket from '@/wx/example/pages/buy/buyTicket'
import buyOrder from '@/wx/example/pages/buy/createOrder'
import buyResult from '@/wx/example/pages/buy/buyResult'
// 我的车票
import myIndex from '@/wx/example/pages/my/index'
import myTicket from '@/wx/example/pages/my/ticketInfo'
// 购票记录
import recordIndex from '@/wx/example/pages/record/index'
import recordDetails from '@/wx/example/pages/record/details'
// 地图
import map from '@/wx/example/pages/map'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/buy/index',
      name: 'buyIndex',
      component: buyIndex,
      meta: {
        title: '定制线路'
      }
    },
    {
      path: '/buy/buyTicket',
      name: 'buyTicket',
      component: buyTicket,
      meta: {
        title: '123路'
      }
    },
    {
      path: '/buy/createOrder',
      name: 'createOrder',
      component: buyOrder,
      meta: {
        title: '订单确认'
      }
    },
    {
      path: '/buy/buyResult',
      name: 'buyResult',
      component: buyResult,
      meta: {
        title: '订单结果'
      }
    },
    {
      path: '/my/index',
      name: 'myIndex',
      component: myIndex,
      meta: {
        title: '我的车票'
      }
    },
    {
      path: '/my/ticket',
      name: 'myTicket',
      component: myTicket,
      meta: {
        title: '123路'
      }
    },
    {
      path: '/record/index',
      name: 'recordIndex',
      component: recordIndex,
      meta: {
        title: '车票列表'
      }
    },
    {
      path: '/record/details',
      name: 'recordDetails',
      component: recordDetails,
      meta: {
        title: '车票详情'
      }
    },
    {
      path: '/map',
      name: 'map',
      component: map,
      meta: {
        title: '地图'
      }
    }
  ]
})
